﻿/**
 * Reboulder - Partial Boulder Dash clone
 * Jesús Sagra, 2014
 * 
 * HiScoreScreen class: shows highest scores
 * 
 * Version    Date     Changes
 * -----------------------------------------------------
 *  0.01   18-jan-2015  Run
 */

using System;

class HiScoresScreen
{
    protected Font font18;
    public void Run()
    {
        HiScores myHiScores = new HiScores();
        font18 = new Font("data/Joystix.ttf", 18);
        do
        {
            short y = 200;
            SdlHardware.ClearScreen();
            for (byte i = 0; i < myHiScores.scores.Length; i++)
            {
                SdlHardware.WriteHiddenText(
                    myHiScores.scores[i].place + "   " +
                    myHiScores.scores[i].name + "   " +
                    myHiScores.scores[i].points,
                    400, y, 255, 255, 255, font18);
                y += 30;
            }            
            SdlHardware.ShowHiddenScreen();
            SdlHardware.Pause(40);
        }
        while (!SdlHardware.KeyPressed(SdlHardware.KEY_ESC));
    }
}